package com.example.kangjujiaofei.service;


import com.example.kangjujiaofei.utils.TokenViewUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.UUID;

@Slf4j
@Component
public class XinShiChuanService {


    @Resource
    private TokenViewUtil tokenViewUtil;

    @Cacheable(cacheNames = "getNWExID")
    public String getNWExID(){
        try {
            String id = tokenViewUtil.getXinShiChuanLogin(getUUID());
            return  id;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return  null;
    }


    @Cacheable(cacheNames = "getNWGUID")
    public String getUUID(){
        return  System.currentTimeMillis()+"";
    }


}
